package test;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class ProvaStampa {
	public static void main(String[] args) throws Exception {
		String n1 = "57623";
		double t1 = 1.0;
		String n2 = "57624";
		double t2 = 2.0;
		String n3 = "57625";
		double t3 = 3.0;
		String n4 = "57626";
		double t4 = 4.0;
		
		stampa(n1, t1);
		stampa(n2, t2);
		stampa(n3, t3);
		stampa(n4, t4);
	}
	
	private static void stampa(String nomeSocket, double tempo) throws IOException{
		String nomeFileGraph = "C://listaConnessioni.txt";
	    FileWriter fw = new FileWriter(nomeFileGraph, true);
	    PrintWriter output = new PrintWriter(fw);
    	String linea = nomeSocket+"-"+tempo;
    	output.println(linea);
    	fw.close();
    	output.close();
	}
}
